export default {
    mode: 'spa',
    /*
     ** Headers of the page
     */
    head: {
        title: "基于Spingboot的旅游游记交流平台",
        meta: [
            { charset: 'utf-8' },
            { name: 'viewport', content: 'width=device-width, initial-scale=1' },
            { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
        ],
        link: [
            { rel: 'icon', type: 'image/x-icon', href: '/myfavicon.ico' },
            { rel: 'stylesheet', type: 'text/css', href: '//at.alicdn.com/t/font_1168872_ehvuah8v57g.css' },
            { rel: 'stylesheet', type: 'text/css', href: '//cdn.jsdelivr.net/npm/v-charts/lib/style.min.css' }
        ]
    },
    /*
     ** Customize the progress-bar color
     */
    loading: { color: '#fff' },
    /*
     ** Global CSS
     */
    css: [
        'element-ui/lib/theme-chalk/index.css',
        'assets/main.css', //新增自定义的页面过度样式
        'quill/dist/quill.core.css',
        // for snow theme
        'quill/dist/quill.snow.css',
        // for bubble theme
        'quill/dist/quill.bubble.css',
    ],
    /*
     ** Plugins to load before mounting the App
     */
    plugins: [
        '@/plugins/element-ui',
        '~/plugins/echarts',
        '@/plugins/axios',
        '@/plugins/vcharts.js',
        { src: '~/plugins/localStorage.js', ssr: false },
        // { src: '~/plugins/nuxt-quill-plugin', ssr: false },
        // { src: '~/plugins/ckeditor.js', ssr: false },
    ],
    /*
     ** Nuxt.js dev-modules
     */
    buildModules: [],
    /*
     ** Nuxt.js modules
     */
    modules: [
        // Doc: https://axios.nuxtjs.org/usage
        '@nuxtjs/axios',
        // '@nuxtjs/proxy',
        // '@ckeditor/ckeditor5-build-classic'
    ],
    /*
     ** Axios module configuration
     ** See https://axios.nuxtjs.org/options
     */
    axios: {
        // baseURL: '/api/',
        proxy: true,
    },
    proxy: {
        '/api/': {
            target: 'http://apis.haoservice.com/',
            pathRewrite: {
                '^/api': '' // 删除url中的/api
            }
        },
        '/api2/': {
            target: 'http://localhost:8010/',
            pathRewrite: {
                '^/api2': '' // 删除url中的/api
            }
        }
    },
    /*
     ** Build configuration
     */
    build: {
        transpile: [/^element-ui/],
        /*
         ** You can extend webpack config here
         */
        extend(config, ctx) {}
    }
}